﻿@model FOModels.News.NewsModel
@{
    var News = (List<FOModels.News.NewsModel>)ViewBag.ListBlogNews;
    int i = 1;
}
<div class="box-blog-news-bank">
    <div class="box-blog-news-bank-left">
        @if (Model != null)
        {
            <a href="@Url.Action("NewsDetail", "News", new { NewsTitle = FO.Models.Conver.ConvertToUnSign(Model.NewsTitle.ToLower()), NewsID = Model.NewsID })" title="@Model.NewsTitle">
                <img class="img-hot-blognews" src="@Model.NewsImg" alt="@Model.NewsTitle" title="@Model.NewsTitle" /></a>

            <h3 class="h3-cate-name-hot-blognews"><a href="#" title="@Model.ProductName">@Model.ProductName</a></h3>

            <h2 class="h2-title-hot-blognews"><a class="a-title-bank" href="@Url.Action("NewsDetail", "News", new { NewsTitle = FO.Models.Conver.ConvertToUnSign(Model.NewsTitle.ToLower()), NewsID = Model.NewsID })">@Model.NewsTitle</a> <a style="text-decoration: none;" href="#"><span class="icon-viewcount">&nbsp;<span>@Model.ViewCount</span></span></a></h2>
            <div class="clr"></div>
            <p class="p-summary-hot-blognews">@Model.NewsSumary</p>
        }
    </div>
    <div class="box-blog-news-bank-right">
        @if (News != null)
        {
            if (News.Count() > 0)
            {
                foreach (var n in News)
                {
                    if (i != 3)
                    {
            <div class="box-list-blognews-item">
                <a href="@Url.Action("NewsDetail", "News", new { NewsTitle = FO.Models.Conver.ConvertToUnSign(n.NewsTitle.ToLower()), NewsID = n.NewsID })" title="@n.NewsTitle">
                    <img class="img-blog-news-item" src="@n.NewsImg" alt="@n.NewsTitle" title="@n.NewsTitle" /></a>
                <div class="box-content-blognews-item">
                    <h2 class="h2-title-blognews-item"><a class="a-title-blognews-item-bank" href="@Url.Action("NewsDetail", "News", new { NewsTitle = FO.Models.Conver.ConvertToUnSign(n.NewsTitle.ToLower()), NewsID = n.NewsID })" title="@n.NewsTitle">@n.NewsTitle</a> <a style="text-decoration: none;" href="#"><span class="icon-viewcount">&nbsp;<span>@n.ViewCount</span></span></a></h2>
                    <p class="p-blog-news-item">@n.NewsSumary</p>
                </div>
                <div class="clr"></div>
                <h4 class="h4-cate-name-hot-blognews"><a href="#">@n.ProductName</a></h4>
            </div>
                   
                    }
                    else
                    {
            <div class="box-list-blognews-item" style="margin-bottom: 0px;">
                <a href="@Url.Action("NewsDetail", "News", new { NewsTitle = FO.Models.Conver.ConvertToUnSign(n.NewsTitle.ToLower()), NewsID = n.NewsID })" title="@n.NewsTitle">
                    <img class="img-blog-news-item" src="@n.NewsImg" alt="@n.NewsTitle" title="@n.NewsTitle" /></a>
                <div class="box-content-blognews-item">
                    <h2 class="h2-title-blognews-item"><a class="a-title-blognews-item-bank" href="@Url.Action("NewsDetail", "News", new { NewsTitle = FO.Models.Conver.ConvertToUnSign(n.NewsTitle.ToLower()), NewsID = n.NewsID })" title="@n.NewsTitle">@n.NewsTitle</a> <a style="text-decoration: none;" href="#"><span class="icon-viewcount">&nbsp;<span>@n.ViewCount</span></span></a></h2>
                    <p class="p-blog-news-item">@n.NewsSumary</p>
                </div>
                <div class="clr"></div>
                <h4 class="h4-cate-name-hot-blognews"><a href="#">@n.ProductName</a></h4>
            </div>
                    }
                    i = i + 1;
                }
            }
        }

    </div>
</div>
